<?php

class Champion{
    private $idChamp;
    private $level;
    
    // Basics caracteristics
    private $bHP; // Health Points
    private $bHR; // Health Regen (every 5 sec)
    private $bAD; // Attack Damage
    private $bAP; // Ability Power
    private $bA;  // Armor
    private $bMR; // Magic Resist
    private $bAS; // Attack Speed
    private $bMS; // Move Speed
    
    //Caracteristics per level
    private $lvlHP;
    private $lvlHR;
    private $lvlAD;
    private $lvlAP;
    private $lvlA;
    private $lvlMR;
    private $lvlAS;
    
    //Other caracteristics
    private $ARFV;  // Armor Reduction Fixed Value
    private $ARP;   // Armor Reduction Percentage
    private $APFV;  // Armor Penetration Fixed Value
    private $APP;   // Armor Penetration Percentage
    
    private $MRRFV; // Magic Resist Reduction Fixed Value
    private $MRRP;  // Magic Resist Reduction Percentage
    private $MPFV;  // Magic Penetration Fixed Value
    private $MPP;   // Magic Penetration Percentage
    
    private $lifeSteal;
    private $spellVamp;
    
    private $criticChance;
    private $criticPercentage; // Equals to 200% of AD by default
    
    private $cdReduction; // Cooldown reduction
    
    private $range;

    //Summoner Spells
    private $ss1;
    private $ss2;
    
    //Spells
    private $s1;
    private $s2;
    private $s3;
    private $ultimate;
    
    //Objects
    private $obj1;
    private $obj2;
    private $obj3;
    private $obj4;
    private $obj5;
    private $obj6;
    
    //Runes
    
    //Masteries
    
    public function getHealthPoints(){
        return $this->bHP + $this->lvlHP * ($this->level - 1);
    }
    
    public function getHealthRegen(){
        return $this->bHR + $this->lvlHR * ($this->level - 1);
    }
    
    public function getAttackDamages(){
        return $this->bAD + $this->lvlAD * ($this->level - 1);
    }
    
    public function getAbilityPower(){
        return $this->bAP + $this->lvlAP * ($this->level - 1);
    }
    
    public function getArmor(){
        return $this->bA + $this->lvlA * ($this->level - 1);
    }
    
    public function getMagicResist(){
        return $this->bMR + $this->lvlMR * ($this->level - 1);
    }
    
    public function getAttackSpeed(){
        return $this->bAS + $this->lvlAS * ($this->level - 1);
    }
    
    
//    public function getFinalArmor(){
//        $finalArmor = $this->bA + $this->lvlA * ($this->level - 1);
//        $finalArmor -= $this->ARFV;
//        
//        if($finalArmor > 0)
//            $finalArmor = $finalArmor * (1 - $this->ARP);
//        
//        $finalArmor = $finalArmor - $this->APFV;
//        if($finalArmor < 0)
//            $finalArmor = 0;
//        else
//            $finalArmor = $finalArmor * (1 - $this->APP);
//        return $finalArmor;
//    }
}

?>
